[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
FPSUBMIT() creates a fax request based on your information and submits
it to the fax board. If no errors are detected, the fax will be "queued"
up for transmission.
-----------------------------------------------------------------------------
Syntax

     FPSUBMIT( <aData> [, <xFiles> ]) --> nResult

Arguments

   <aData>    A Clipper array containing information about the fax.
              The order of elements is fixed AND the array must have
              at least three elements. Elements are described below.

   <xFiles>   This may be a CHARACTER variable with one file name, or
              an ARRAY of filenames. These are the files that will be faxed.
              If you want to send ONLY a cover page fax, omit this argument.

Returns

   A positive "event id" number or a negative error code.

   The "event id" should be saved so that it can later be used to
   determine the outcome of this particular fax.


Data Array Arguments

   <aData>    The "info" array <aData> provides the required information to
              generate a fax. The order of the array elements is REQUIRED.
              Only the first three elements are required.

   aData[1]   FROM name  (31 characters max length)          *REQUIRED*
              (CHAR)     If this element is NIL, the default sender name
                         you specified in the fax board installation will
                         be used.

   aData[2]   TO name    (31 characters max length)          *REQUIRED*
              (CHAR)     If this is NIL, then no TO name will be shown.

   aData[3]   PHONE #    (47 characters max length)          *REQUIRED*
              (CHAR)     For obvious reasons, this must NOT be NIL!

   aData[4]   DATE       Date to send fax. NOTE!!!!! this MUST be a
              (CHAR)     CHARACTER variable formatted MM/DD/YY.
                         -->> DO NOT use a DATE variable!!!!!. <<--
                         DEFAULT: Today

   aData[5]   TIME       Time to send fax. This MUST be a CHARACTER
              (CHAR)     variable formatted HH:MM. Also be sure to use
                         24 hour time (1pm = 13:00).
                         DEFAULT: Current time

   aData[6]   TYPE       Send resolution or file transfer mode.
              (NUM)         0 = fax fine resolution
                            1 = fax standard resolution
                            2 = file transfer mode
                         DEFAULT: Fax Standard resolution

                         Fax "fine" provides the best printed results, but
                         takes longer to send. You can "file transfer"
                         any type file but ONLY to another fax board!
                         File transfer probably won't work between boards
                         of differing brands.

   aData[7]   LOGOFILE   Logo file to put on cover page (incl. PATH). This
              (CHAR)     is a PCX image that will appear in the top half
                         of the cover sheet. Read your fax board document-
                         ation for limitations and requirements.

   aData[8]   DELETE     This option controls whether or not the file(s)
              (NUM)      you send are automatically deleted after the fax.
                            0 = never delete
                            1 = delete if fax is successful,
                            2 = never delete files.

                         DEFAULT: Never delete
                         NOTE: this feature only works with recent versions
                         of CAS (1.2+).

   aData[9]   TAG        This is a user-definable field that you can use
              (CHAR)     for your own purpose. Max size is 60 characters.
                         It does not show up on the received fax, but
                         can be retrieved by FPSTATUS().

   aData[10]  COVERPAGE  If you want to have a cover page automatically
              (LOGIC)    sent with your fax, set this to .T. See your fax
                         board documentation for info about cover pages.

   aData[11]  COVERTEXT  You can put approx. 36 lines (80 chars.) of text
              (CHAR)     on the cover page if you want. Be sure to include
                         either line feeds CHR(10) or carriage return/line
                         feed CHR(10)+CHR(13) at the end of each line of
                         text.

   aData[12]  TEXTSIZE   Your fax page can be either a standard 80 columns
              (NUM)      by 66 rows, or your can used the compressed text
                         which gives 132 columns by 88 rows on an 8.5 x 11
                         page.
                            0 = normal text
                            1 = compressed text.

                         DEFAULT: Normal text

   aData[13]  PAGELENGTH You can control the length of the faxed page by
              (NUM)      setting this to the desired number of inches.
                         Note that 0 means the default 11 in., 5 = five
                         inches, etc.
                         DEFAULT: 8.5 inches
-----------------------------------------------------------------------------
Example

    This example uses ALL of the options, but remember, only the first three
    elements of the data array are required!

    LOCAL aFaxData[13], aFiles[2], cCoverText, nID

    cCoverText := "Line one of cover text" + CHR(10) + ;
                  "Line two of cover text" + CHR(10) + ;
                  "Last cover text line"

    aFiles[1] := "C:\DOC\SOMENAME.TXT"          // files to be faxed
    aFiles[2] := "C:\DOC\LETTER1.TXT"

    aFaxData[1] := "Jeff Hofstetter"           // from name
    aFaxData[2] := "FAXPak Customer"           // to name
    aFaxData[3] := "440.7683"                  // fax phone number
    aFaxData[4] := "02/15/92"                  // date as CHARACTER!!!
    aFaxData[5] := "23:30"                     // send at 11:30 pm
    aFaxData[6] := 0                           // fax fine mode
    aFaxData[7] := "C:\FAX\MYLOGO.PCX"         // logo file
    aFaxData[8] := 1                           // delete file if success
    aFaxData[9] := "My tag data"               // tag field
    aFaxData[10]:= .T.                         // send cover page
    aFaxData[11]:= cCoverText                  // cover text
    aFaxData[12]:= 0                           // normal text size
    aFaxData[13]:= 0                           // page length=normal

    IF !FPINIT()
       ? "Sorry no fax board available!"
       QUIT
    ENDIF

    nID := FPSUBMIT(aFaxData, aFiles)
    IF nID < 0
       ? "Failed to submit fax. Error:", nID
       QUIT
    ELSE                                        // fax submitted okay!
       ... save nID for later use
   ENDIF

This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson